import request from "@/utils/request";
import { setToken } from "@/utils/storage";
import { LOGIN } from "../constanst/login";
import { GET_USER_INFO } from "../constanst/user";
export const getUserInfo = () => {
  return async (dispatch) => {
    const res = await request.get('/user/profile')
    dispatch({
      type:GET_USER_INFO,
      payload:res.data.data
    })
  }
}